﻿// <copyright file="InvalidProofKeyException.cs" company="SharpSTS">
// Copyright (c) 2007, 2008 All Right Reserved, http://sharpsts.com/
//
// This source is subject to the Microsoft Permissive License.
// Please see the License.txt file for more information.
// All other rights reserved.
//
// THIS CODE AND INFORMATION ARE PROVIDED "AS IS" WITHOUT WARRANTY OF ANY 
// KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE
// IMPLIED WARRANTIES OF MERCHANTABILITY AND/OR FITNESS FOR A
// PARTICULAR PURPOSE.
//
// </copyright>
// <author>Barry Dorrans</author>
// <email>barryd@idunno.org</email>
// <date>2008-06-20</date>
// <summary>Thrown when an invalid proof key specified in request.</summary>

namespace SharpSTS
{
    using System;

    using Properties;

    /// <summary>
    /// Thrown when an invalid proof key specified in request.
    /// </summary>
    [Serializable]
    internal class InvalidProofKeyException : IdentityProviderException
    {
        /// <summary>
        /// Initializes a new instance of the <see cref="InvalidProofKeyException"/> class.
        /// </summary>
        public InvalidProofKeyException()
            : base(Constants.WSIdentity.FaultCodes.InvalidProofKey, Resources.FaultInvalidProofKey)
        {
        }

        /// <summary>
        /// Initializes a new instance of the <see cref="InvalidProofKeyException"/> class.
        /// </summary>
        /// <param name="info">The <see cref="T:System.Runtime.Serialization.SerializationInfo"/> that holds the serialized object data about the exception being thrown.</param>
        /// <param name="context">The <see cref="T:System.Runtime.Serialization.StreamingContext"/> that contains contextual information about the source or destination.</param>
        /// <exception cref="T:System.ArgumentNullException">The <paramref name="info"/> parameter is null. </exception>
        /// <exception cref="T:System.Runtime.Serialization.SerializationException">The class name is null or <see cref="P:System.Exception.HResult"/> is zero (0). </exception>
        protected InvalidProofKeyException(
          System.Runtime.Serialization.SerializationInfo info,
          System.Runtime.Serialization.StreamingContext context)
            : base(info, context)
        {
        }
    }
}
